﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace WebSocketChat.Common.Robot
{
    public class Helper
    {
        private static string ServiceUrl = "http://www.tuling123.com/openapi/api?key=12545ea9c117468bb06fe382ee3197f1&info={0}";

        public Task<string> Chat(string msg)
        {
            WebClient wc = new WebClient();
            return wc.DownloadStringTaskAsync(new Uri(string.Format(ServiceUrl, msg)));
        }
    }
}
